package com.company.JDBC高级;

import java.sql.*;
import java.util.List;

public class connectionDemo extends connection适配器{
    private Connection con;
    private List<Connection> pool;

    public connectionDemo(Connection con, List<Connection> pool) {
        super(con);
        this.con = con;
        this.pool = pool;
    }

    @Override
    public void close() throws SQLException {
        pool.add(con);
    }


}